<%= form_for(@purchase_item) do |f| %>
  <% if @purchase_item.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@purchase_item.errors.count, "error") %> prohibited this purchase_item from being saved:</h2>

      <ul>
      <% @purchase_item.errors.full_messages.each do |msg| %>
        <li><%= msg.message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :purchase_id %><br />
    <%= f.number_field :purchase_id %>
  </div>
  <div class="field">
    <%= f.label :product_id %><br />
    <%= f.number_field :product_id %>
  </div>
  <div class="field">
    <%= f.label :size_id %><br />
    <%= f.number_field :size_id %>
  </div>
  <div class="field">
    <%= f.label :quantity %><br />
    <%= f.number_field :quantity %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
